<ul id="kx_gallery_inline" class="kx_gallery_inline kx_display kx_list">

	<?php foreach ($this->rowset as $gallery):?>
	<li class="kx_gallery kx_item">
		<div class="kx_head">
			<h2 class="kx_title"><?php print $gallery['name']?></h2>
		</div>
		<div class="kx_content">
			<div class="kx_description"><?php print $gallery['description']?></div>
			<ul class="kx_gallery_album kx_list">
				<?php foreach ($gallery['albums'] as $album):?>
					<?php switch($album['type']):
						default:?>

					<?php case 'image':?>
						<li class="kx_gallery_type_image kx_item">
							<div class="kx_head">
								<h3 class="kx_title">
									<a href="<?php print $this->url(array('module' => 'gallery','controller' => 'album','action' => 'display','id' => $album['id']), 'default', true);?>">
										<?php print $this->escape($album['name'])?>
									</a>
								</h3>
							</div>
							<div class="kx_content">
								<a href="<?php print $this->url(array('module' => 'gallery','controller' => 'album','action' => 'display','id' => $album['id']), 'default', true);?>">
									<img alt="<?php print $this->escape($album['name'])?>" src="/upload/gallery/polaroid/<?php print $this->escape($album['image'])?>">
								</a>
							</div>
						</li>
							
					<?php break;?>
					
					<?php case 'media':?>
						<li class="kx_gallery_type_media kx_item">
							<div class="kx_head">
								<h3 class="kx_title">
									<a href="<?php print $this->url(array('module' => 'gallery','controller' => 'album','action' => 'display','id' => $album['id']), 'default', true);?>">
										<?php print $this->escape($album['name'])?>
									</a>
								</h3>
							</div>
							<div class="kx_content">
								<a href="<?php print $this->url(array('module' => 'gallery','controller' => 'album','action' => 'display','id' => $album['id']), 'default', true);?>">
									<img alt="<?php print $album['name']?>" src="/upload/media/polaroid/<?php print $this->escape($album['image'])?>">
								</a>
							</div>
						</li>
					<?php break;?>
					
				<?php endswitch;?>
				<?php endforeach;?>

			</ul>
		</div>
	</li>
	<?php endforeach;?>

</ul>